﻿using Infrastructure.ElasticSearch.Enums;

namespace Infrastructure.ElasticSearch.Nests
{
    public class ElasticSearchRange
    {
        public string RangeName { get; private set; }
        public RangeTypeEnum RangeType { get; private set; }
        public RangeOperEnum RangeOpera { get; private set; }
        public string Val { get; private set; }

        public ElasticSearchRange(string name, RangeTypeEnum rangeType, RangeOperEnum rangeOpera)
        {
            this.RangeName = name;
            this.RangeType = rangeType;
            this.RangeOpera = rangeOpera;
        }

        public void SetVal(string val)
        {
            if (val != null)
                Val = val;
        }
    }
}
